\hypertarget{namespacepentester_1_1hosts_1_1views}{
\section{pentester::hosts::views Namespace Reference}
\label{namespacepentester_1_1hosts_1_1views}\index{pentester::hosts::views@{pentester::hosts::views}}
}


\subsection*{Functions}
\begin{CompactItemize}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_c08fc625607fd601baab68fe0fce9ee1}{ifaces}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_512fae1f9970999012795ebb9009331e}{ifaceslist}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_85909d96a9c815feecf4d0d8d19daf39}{iface\_\-detail}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_3213676ad860af15841f96d34be9f82b}{index}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_a89c86a354837849558e7df797f8b173}{createMenu}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_c2f63f6b33457ab8522ed5500a3c3924}{services}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_1926b72c34c20cd159ff59a5aa8d727b}{servupdate}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_2adc635c379307d052813cc06b75fbc3}{addport}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_3ba86f5739b7182a4ed3147cd0b61a71}{configuration}
\item 
def \hyperlink{namespacepentester_1_1hosts_1_1views_22dada6097d262fc4c3b7bbbe79b923b}{deletehost}
\end{CompactItemize}


\subsection{Function Documentation}
\hypertarget{namespacepentester_1_1hosts_1_1views_2adc635c379307d052813cc06b75fbc3}{
\index{pentester::hosts::views@{pentester::hosts::views}!addport@{addport}}
\index{addport@{addport}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[addport]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::addport ( {\em request})}}
\label{namespacepentester_1_1hosts_1_1views_2adc635c379307d052813cc06b75fbc3}




\footnotesize\begin{verbatim}
    Adds user-specified service to services table in database.
\end{verbatim}
\normalsize
 

Definition at line 114 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_3ba86f5739b7182a4ed3147cd0b61a71}{
\index{pentester::hosts::views@{pentester::hosts::views}!configuration@{configuration}}
\index{configuration@{configuration}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[configuration]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::configuration ( {\em request})}}
\label{namespacepentester_1_1hosts_1_1views_3ba86f5739b7182a4ed3147cd0b61a71}




\footnotesize\begin{verbatim}
    This view is used to create, display or edit configuration
    of our tool. Currently this view is used for setting path
    to local meta sploit framework, or setting the IP address and destination
    port of the remote meta sploit framework.
    This view is based on Django generic views. If configuration object
    does not exist in the database we create it. If exist, just display
    and update it.
\end{verbatim}
\normalsize
 

Definition at line 137 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_a89c86a354837849558e7df797f8b173}{
\index{pentester::hosts::views@{pentester::hosts::views}!createMenu@{createMenu}}
\index{createMenu@{createMenu}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[createMenu]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::createMenu ( {\em current})}}
\label{namespacepentester_1_1hosts_1_1views_a89c86a354837849558e7df797f8b173}




\footnotesize\begin{verbatim}
Returns a dictionary of menu items. If 'current' argument matches 'name' property of
particular menu item, it sets True, for 'current' property in dictionary.
\end{verbatim}
\normalsize
 

Definition at line 57 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_22dada6097d262fc4c3b7bbbe79b923b}{
\index{pentester::hosts::views@{pentester::hosts::views}!deletehost@{deletehost}}
\index{deletehost@{deletehost}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[deletehost]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::deletehost ( {\em request}, \/   {\em hostid})}}
\label{namespacepentester_1_1hosts_1_1views_22dada6097d262fc4c3b7bbbe79b923b}




\footnotesize\begin{verbatim}
Deletes all services associated with particular host and host itself 
from the database. Takes host ID as an argument. After deleting object
from the model, redirects to the list of services.
\end{verbatim}
\normalsize
 

Definition at line 169 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_85909d96a9c815feecf4d0d8d19daf39}{
\index{pentester::hosts::views@{pentester::hosts::views}!iface\_\-detail@{iface\_\-detail}}
\index{iface\_\-detail@{iface\_\-detail}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[iface\_\-detail]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::iface\_\-detail ( {\em request}, \/   {\em iface})}}
\label{namespacepentester_1_1hosts_1_1views_85909d96a9c815feecf4d0d8d19daf39}




\footnotesize\begin{verbatim}
Display detailed information about particular network interface in the
system.
\end{verbatim}
\normalsize
 

Definition at line 35 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_c08fc625607fd601baab68fe0fce9ee1}{
\index{pentester::hosts::views@{pentester::hosts::views}!ifaces@{ifaces}}
\index{ifaces@{ifaces}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[ifaces]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::ifaces ( {\em request})}}
\label{namespacepentester_1_1hosts_1_1views_c08fc625607fd601baab68fe0fce9ee1}




\footnotesize\begin{verbatim}
Displays names of all network interfaces in the system.
\end{verbatim}
\normalsize
 

Definition at line 9 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_512fae1f9970999012795ebb9009331e}{
\index{pentester::hosts::views@{pentester::hosts::views}!ifaceslist@{ifaceslist}}
\index{ifaceslist@{ifaceslist}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[ifaceslist]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::ifaceslist ()}}
\label{namespacepentester_1_1hosts_1_1views_512fae1f9970999012795ebb9009331e}




\footnotesize\begin{verbatim}
Gets list of network interfaces on the system and returns a list of 
dictionaries with 'name', 'ip' and 'mask' keys. Works with conjunction
on IFConfig module.
\end{verbatim}
\normalsize
 

Definition at line 23 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_3213676ad860af15841f96d34be9f82b}{
\index{pentester::hosts::views@{pentester::hosts::views}!index@{index}}
\index{index@{index}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[index]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::index ( {\em request})}}
\label{namespacepentester_1_1hosts_1_1views_3213676ad860af15841f96d34be9f82b}




\footnotesize\begin{verbatim}
This view is used to render main application page. 
All the work being done here is getting network interface list and
creating code for navigation menu.
\end{verbatim}
\normalsize
 

Definition at line 49 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_c2f63f6b33457ab8522ed5500a3c3924}{
\index{pentester::hosts::views@{pentester::hosts::views}!services@{services}}
\index{services@{services}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[services]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::services ( {\em request}, \/   {\em hostid} = {\tt None})}}
\label{namespacepentester_1_1hosts_1_1views_c2f63f6b33457ab8522ed5500a3c3924}




\footnotesize\begin{verbatim}
    Returns list of hosts correlated with services.
    If 'hostid' argument given, returns services of the particular host.
\end{verbatim}
\normalsize
 

Definition at line 75 of file hosts/views.py.\hypertarget{namespacepentester_1_1hosts_1_1views_1926b72c34c20cd159ff59a5aa8d727b}{
\index{pentester::hosts::views@{pentester::hosts::views}!servupdate@{servupdate}}
\index{servupdate@{servupdate}!pentester::hosts::views@{pentester::hosts::views}}
\subsubsection[servupdate]{\setlength{\rightskip}{0pt plus 5cm}def pentester::hosts::views::servupdate ( {\em request})}}
\label{namespacepentester_1_1hosts_1_1views_1926b72c34c20cd159ff59a5aa8d727b}




\footnotesize\begin{verbatim}
   Updates services table.
   Sets service to 'up' state if serviceXX box is checked in POST request.
   Otherwise sets service to 'down' state. After saving changes, redirects
   user to service list view.
\end{verbatim}
\normalsize
 

Definition at line 98 of file hosts/views.py.